﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AmorCanino.Web.Models.Models;
using AmorCanino.Common;

namespace AmorCanino.Web.Models.Services
{
    public class HomeService : BaseService, IHomeService
    {
        public Models.Home GetHome()
        {
            var home = new Home();

            home.AdoptablePets = new AdoptionService().getPagedPets(1).Take(ConfigurationHandler.AdoptablePets).ToList();
            home.BridablePets = new BridingService().getPagedPets(1).Take(ConfigurationHandler.BridablePets).ToList();

            var articleServices = new ArticleService();
            home.NewArticles = articleServices.GetTopNew().ToList();
            home.RecomendedArticles = articleServices.GetTopMarked().ToList();

            return home;
        }
    }
}